﻿<workflow id="1">
  <start>100</start>
  <step id="100" type="2">
    <next>
      <condition><![CDATA[
      select check_userrole(@createUserId,4);
      ]]></condition>
      <true>101</true>
      <false>102</false>
    </next>
    <remark>判断是否为员工</remark>
  </step>
  <step id="101" type="1">
    <name>部门经理审批</name>
    <task>1</task>
    <next>102</next>
  </step>
  <step id="102" type="1">
    <name>HR审批</name>
    <task>3</task>
    <next>103</next>
  </step>
  <step id="103" type="2">
    <next>
      <condition><![CDATA[
      select check_userrole(@createUserId,array[5,6]);
      ]]></condition>
      <true>104</true>
      <false>105</false>
    </next>
    <remark>判断是否为中高层</remark>
  </step>
  <step id="104" type="1">
    <name>总经理审批</name>
    <task>4</task>
    <next>105</next>
  </step>
  <step id="105" type="1">
    <name>抄送</name>
    <task>101</task>
  </step>
</workflow>